<?php
 header("Content-type: text/html; charset=utf-8"); 
 include('connect.php');
 $num=$_GET['num'];
 $sql="select touser,send_time,errcode,tfread from send_log order by send_time desc limit ".$num;
 // $notice=$db->query($sql);
 // $row = $notice->fetch_assoc();
  $result = mysqli_fetch_all(mysqli_query($db,$sql),MYSQLI_ASSOC);
 for($i=0;$i<count($result);$i++){
	 if($result[$i]['errcode']==0){
		$tt='成功';
		}else{
			$tt='失败';
		}
	 echo "<tr class='italic'><td>".$result[$i]['touser']."</td><td>".$result[$i]['send_time']."</td><td>".$result[$i]['errcode']."</td><td>".$tt."</td><td>".$result[$i]['tfread']."</td></tr>";
 }
?>